-#
  Copyright 2008 Garth Williams

  This file is part of CommandPost.

  CommandPost is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  CommandPost is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with CommandPost.  If not, see <http://www.gnu.org/licenses/>.


%h1 Responsibilities

= link_to 'Manage Roles', roles_path

.responsibilities
  %table
    %tr
      %td
        %h2 Users
      %td
        %h2 Roles
    %tr
      %td{:valign => 'top'}
        #users
          - for user in @users
            .user
              = link_to_remote h(user.name), :url => {:action => 'list_roles', :user_id => user.id}, :update => 'roles', :before => "$('roles').style.display = 'none';$('loading_roles').style.display = 'inline'", :complete => "$('loading_roles').style.display = 'none';$('roles').style.display = 'inline';"
      %td{:valign => 'top'}
        %img#loading_roles{:src => '/images/loading.gif', :style => 'display: none;'}
        #roles
          Select a user
